package com.yn.xgame.message;

import com.yn.xgame.IFunc2;

/**
 * 带两个参数调用消息
 * Created by wangboo on 2017/7/11.
 */
public class Func2Message<T1, T2> implements IFuncMessage {

    private T1 t1;
    private T2 t2;
    private IFunc2<T1, T2> func2;

    public Func2Message(T1 t1, T2 t2, IFunc2<T1, T2> func2) {
        this.t1 = t1;
        this.t2 = t2;
        this.func2 = func2;
    }

    @Override
    public void apply() {
        func2.call(t1, t2);
    }
}
